package com.fandy.struts.DAL;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.fandy.struts.SqlAccess.SqlServerHelper;
import com.fandy.struts.SqlStatement.Provision;


public class DALProvision {
 
 SqlServerHelper ssh = new SqlServerHelper();
 Provision p = new Provision();
 
 
	public   ResultSet  getAll()
	{
		return   ssh.executeScalar(p.getAll());
	}
	
	public   ResultSet getProvisionInfoByID(int ID)
	{
		return  ssh.executeScalar(p.getProvisionInfoByID(ID));
	}
	
	
	public   ResultSet  existProvision(com.fandy.struts.Model.Provision pro)
	{
		return   ssh.executeScalar(p.existProvision(pro));
	}
	
	public   ResultSet  existProvision(int id)
	{
		return  ssh.executeScalar(p.existProvision(id));
	}
	
	public int UpdateByID(int id,com.fandy.struts.Model.Provision pro) throws SQLException
	{
		
		return  ssh.executeNoQuery(p.UpdateByID(id, pro));	
	}
	
	public int DeleteByID(int id) throws SQLException
	{
		
		return ssh.executeNoQuery(p.DeleteByID(id));
		
	}
	
	
	
}

